
(import (turtle simple)
        (scheme base)
        (scheme case-lambda))

(define (poly side turn)
  (fd side)
  (rt turn)
  (poly side turn))

(define polystop
  (case-lambda
    ((side turn)
     (polystop side turn 0))
    ((side turn theta)
     (when (or (positive? (modulo theta 360))
               (= theta 0))
       (fd side)
       (rt turn)
       (polystop side turn (+ theta turn))))))

(line-color 'green)
;(poly 100 141.914)
(polystop 150 144 0)
;(polystop 5 5 0)
